import 'package:daoyi_ui_admin_getx/app/modules/home/info/info_item_widget.dart';
import 'package:daoyi_ui_admin_getx/app/modules/home/info/info_widget.dart';
import 'package:daoyi_ui_admin_getx/app/routes/app_pages.dart';
import 'package:daoyi_ui_admin_getx/app/widgets/page_content.dart';
import 'package:daoyi_ui_admin_getx/app/widgets/search_bar/search_bar_widget.dart';
import 'package:daoyi_ui_admin_getx/generated/locales.g.dart';
import 'package:flutter/material.dart';

import 'package:get/get.dart';

import 'discovery_controller.dart';

class DiscoveryView extends GetView<DiscoveryController> {
  const DiscoveryView({super.key});

  @override
  Widget build(BuildContext context) {
    // return PageContent(
    //   name: LocaleKeys.pages_discovery_title.tr,
    // );
    return Scaffold(
      appBar: AppBar(
        title: SearchBarWidget(
          onSearch: () {
            Get.toNamed(Routes.SEARCH_PAGE);
          },
        ), //Text(LocaleKeys.pages_home_title.tr),
      ),
      body: SafeArea(
        child: ListView(
          children: controller.dataList
              .map(
                (item) => InfoItemWidget(item),
              )
              .toList(),
        ),
      ),
    );
  }
}
